package com.gjs.freechat.web.business;

import java.util.Collections;
import java.util.Comparator;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gjs.freechat.server.business.ChatSessionBusiness;
import com.gjs.freechat.server.component.ChatSessionManage;
import com.gjs.freechat.server.component.bean.Conversation;
import com.gjs.freechat.server.component.bean.Message;
import com.gjs.freechat.web.utils.MyWebUtils;


@Service
public class WebChatSessionManage {
	
	@Autowired
	ChatSessionManage chatSessionManage;
	
	@Autowired
	WebUserConnectionPool connPool;
	
	@Autowired
	private ChatSessionBusiness chatSessionBusiness;
	
	public List<Conversation> getAllConvos(HttpServletRequest request) {
		List<Conversation> convos = (List<Conversation>) MyWebUtils.getHttpSessionAttr(request, "allConvos");
		return convos;
	}
	
}
